package com.jic.market.enums;

/**
 * @author yinhaijun
 * @date: 2020/4/13
 */
public enum  DiscountDetailStatusEnum {

    CREATE(1, "已创建"),
    PAY(2, "支付"),
    REFUND(3, "已退"),
    REFUNDING(4, "部分退标记"),
    CREDITED(5, "入账");


    private Integer code;
    private String message;

    DiscountDetailStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static DiscountDetailStatusEnum getByCode(Integer code){
        DiscountDetailStatusEnum[] values = DiscountDetailStatusEnum.values();
        for(DiscountDetailStatusEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
